#ifndef CUSTOM_COMMON_INCLUDED
#define CUSTOM_COMMON_INCLUDED
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl"
#include "UnityInput.hlsl"

#define UNITY_MATRIX_M unity_ObjectToWorld // 矩阵：模型空间坐标 -> 世界空间坐标
#define UNITY_MATRIX_I_M unity_WorldToObject // 矩阵：世界空间坐标 -> 模型空间坐标
#define UNITY_MATRIX_V unity_MatrixV // 矩阵：世界空间 -> 相机空间
#define UNITY_MATRIX_I_V unity_MatrixInvV // 矩阵：相机空间 -> 世界空间
#define UNITY_MATRIX_VP unity_MatrixVP // 矩阵：世界空间 -> 齐次裁剪空间
#define UNITY_PREV_MATRIX_M unity_prev_MatrixM
#define UNITY_PREV_MATRIX_I_M unity_prev_MatrixIM
#define UNITY_MATRIX_P glstate_matrix_projection // 矩阵：相机空间 -> 齐次裁剪空间
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/SpaceTransforms.hlsl"

// 平方
float Square (float v) {
    return v * v;
}

#endif